Payment Links are created using the Payments Create API by setting the payment_link field to true in the request payload.
Payment links cannot be confirmed at the time of creation. Therefore, the confirm field must not be set to true.

Configuration Fallback Logic

Each field in the request follows a fallback logic to determine the configuration used:
  1. Configuration provided during payment link creation (via payment_link_config)
  2. Configuration set at the business profile level
  3. Default values defined for payment links
Refer to the UI Configuration section for default values and styling options.

This example shows how to create a payment link that uses the UI configuration already set in the specified business profile.
curl --location '{{BASE_URL}}/payments' \
--header 'Content-Type: application/json' \
--header 'api-key: {{API_KEY}}' \
--data '{
  "amount": 100,
  "currency": "USD",
  "payment_link": true,
  "profile_id": "pro_YXlbYtgiANENrZgxdL8Q"
}'

You can override the profile-level config by sending a custom payment_link_config directly in the API request.
curl --location '{{BASE_URL}}/payments' \
--header 'Content-Type: application/json' \
--header 'api-key: {{API_KEY}}' \
--data '{
  "amount": 100,
  "currency": "USD",
  "payment_link": true,
  "profile_id": "pro_YXlbYtgiANENrZgxdL8Q",
  "payment_link_config": {
    "theme": "#4E6ADD",
    "logo": "https://vaultera switch.io/favicon.ico",
    "seller_name": "vaultera switch Inc.",
    "sdk_layout": "accordion",
    "display_sdk_only": true,
    "enabled_saved_payment_method": true,
    "hide_card_nickname_field": true,
    "show_card_form_by_default": true,
    "payment_button_text": "Proceed to Payment!",
    "transaction_details": [
      {
        "key": "Policy Number",
        "value": "297472368473924",
        "ui_configuration": {
          "position": 5,
          "is_key_bold": true,
          "is_value_bold": true
        }
      }
    ]
  }
}'

Use a Specific Style ID (Predefined in Business Profile)

If you’ve defined multiple styles in the business profile, you can reference one by its style ID using the payment_link_config_id field.
curl --location '{{BASE_URL}}/payments' \
--header 'Content-Type: application/json' \
--header 'api-key: {{API_KEY}}' \
--data '{
  "amount": 100,
  "currency": "USD",
  "payment_link": true,
  "profile_id": "pro_YXlbYtgiANENrZgxdL8Q",
  "payment_link_config_id": "style1"
}'